<html>
<head><meta charset="utf-8"><title>Is there an explanation of the various diagnostic macros? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20explanation.20of.20the.20various.20diagnostic.20macros.3F.html">Is there an explanation of the various diagnostic macros?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216112876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20explanation%20of%20the%20various%20diagnostic%20macros%3F/near/216112876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> vn-ki <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20explanation.20of.20the.20various.20diagnostic.20macros.3F.html#216112876">(Nov 09 2020 at 16:59)</a>:</h4>
<p>I see <code>bug!</code>, <code>delay_span_bug!</code>, <code>delay_span_err!</code> etc and I don't really understand what does what. Is there an explanation of these macros somewhere? The diagnostics page of rustc dev guide seems to give an introduction but the <code>delay</code> variants and <code>bug!</code> isn't covered there.</p>



<a name="216123377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20explanation%20of%20the%20various%20diagnostic%20macros%3F/near/216123377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20explanation.20of.20the.20various.20diagnostic.20macros.3F.html#216123377">(Nov 09 2020 at 18:16)</a>:</h4>
<p>I don't know about the other two, but I think <code>bug!</code> is just an alias for <code>panic!</code></p>



<a name="216123516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Is%20there%20an%20explanation%20of%20the%20various%20diagnostic%20macros%3F/near/216123516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Is.20there.20an.20explanation.20of.20the.20various.20diagnostic.20macros.3F.html#216123516">(Nov 09 2020 at 18:17)</a>:</h4>
<p>Actually, it looks like in some cases it's just an alias for <code>panic!</code>, but it has other logic too.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>